x86/cpu: Move set_cpumask() calls into c_early_init()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 26 Nov 2015 16:02:10 +0000 (16:02 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 8 Apr 2016 20:54:16 +0000 (21:54 +0100)
commit36e3c8f10f3b90a92e4f5fb395fb261c1dc7ad62
treee5a0fec68f92d54e2a4d3e2bf7c00b855dc35b48
parentb648feff8ea2c9bff250b4b262704fb100b1f9cf
x86/cpu: Move set_cpumask() calls into c_early_init()

Before c/s 44e24f8567 "x86: don't call generic_identify() redundantly", the
commandline-provided masks would take effect in Xen's view of the processor
features.

As the masks got applied after the query for features, the redundant call to
generic_identify() would clobber the pre-masking feature information with the
post-masking information.

Move the set_cpumask() calls into c_early_init() so the effects of the command
line parameters take place before the main query for features in
generic_identify().

The cpuid_mask_* command line parameters now limit the entire system.
Subsequent changes will cause the mask MSRs to be context switched per-domain,
removing the need to use the command line parameters for heterogeneous
levelling purposes.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/amd.c
xen/arch/x86/cpu/intel.c